package com.xrkj.b2c.controller.common;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;

import com.xrkj.b2c.model.sys.SysMember;
import com.xrkj.b2c.service.bus.BusShopCartService;
import com.xrkj.b2c.service.sys.SysMemberLevelService;
import com.xrkj.b2c.service.sys.SysMemberService;
import com.xrkj.b2c.utils.PropertiesUtils;

/**
 * 
 * <B>系统名称：</B><BR>
 * <B>模块名称：</B><BR>
 * <B>中文类名：</B>基类<BR>
 * <B>概要说明：</B><BR>
 * @author 赵子靖 zzj@zhaozijing.cn
 * @since 2018年7月16日
 */
@Controller
public class BasicController {
    @Autowired
    public BusShopCartService shopCartService;
    @Autowired
    public SysMemberService memberService;
    @Autowired
    public SysMemberLevelService memberLevelService;
    
    /**
     * 
     * <B>方法名称：</B>进入控制器之前执行<BR>
     * <B>概要说明：</B><BR>
     * @author perry
     * @since 2018年7月16日 	
     * @param model
     * @param request
     */
    @ModelAttribute
    public void preHandler(Model model,HttpServletRequest request){
        request.setAttribute("webRoot", request.getContextPath());
    }

	
//	public Properties readProperties(String filename,HttpServletRequest request){
//		PropertiesUtils prt=new PropertiesUtils();
//		Properties pro=prt.readProperties(filename);
//		request.setAttribute("skinsDir",pro.getProperty("skinsDir"));
//		return pro;
//	}
	
}
